<!DOCTYPE html>
<html>

	<head>
		<meta charset="utf-8">
		<meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
		<title>我的会员</title>
		<script src="__INDEX__/js/mui.min.js"></script>
		<link href="__INDEX__/css/mui.min.css" rel="stylesheet" />
		<link rel="stylesheet" href="__INDEX__/css/iconfont.css" />
		<link rel="stylesheet" href="__INDEX__/css/style.css" />
		<link rel="stylesheet" href="__INDEX__/css/member.css" />
	</head>

	<body>
		<header class="mui-bar mui-bar-nav">
			<a class=" mui-icon mui-icon-left-nav mui-pull-left" href="JavaScript:history.go(-1)"></a>
			<h1 class="mui-title" id="top_name">我的会员</h1>
		</header>
		<div class="mui-content message_content">
			<ul class="message_bottom" id="rm_ul">
				<!--<li class="clearfix">
					<div class="mes_top_icon"><img style="width:40px;height:40px;" src="http://newapp.cn/../images/toux.jpg"></div>
					<div class="mes_top_info">
						<p class="mes_top_bt">
							用户昵称：龙信会员</p>
						<p class="mes_t_nr">手机号码：</p>
					</div>
				</li>-->
			</ul>
		</div>
		<div id="footer"></div>
		<input type="hidden" id="page" value="1" />
	</body>

</html>

<script type="text/javascript" src="__INDEX__/js/jquery.min.js"></script>
<script type="text/javascript" src="__INDEX__/js/layer/layer.min.js"></script> 
<script>
	list();
	function list(){
		$.ajax({
			type:"post",
			data:{ 
				page:$("#page").val()
			},
			url:"{:url('index/member/friends_list')}",
			success:function(data){	 
				var list=data.list;  
				var html=""; 
				if(list != ''){ 
					for(var i=0;i<list.length;i++){
						var log=list[i];  
						var img = '';
						if(log.logo){
							img = log.logo;
						}else{
							img = '__INDEX__/img/member.jpg'
						}
						html+='<li class="less clearfix">' 
						    +'<div class="mes_top_icon"><img style="width:40px;height:40px;" src="'+img+'"></div>'
				    		+'<div class="mes_top_info">'
				    		+'<p class="mes_top_bt">用户昵称：'+log.nickname+'</p>'
				    		+'<p class="mes_t_nr">手机号码：'+log.mobile+'</p>'
				    		+'</div>'
				    		+'</li>'
					}
				}else{
					if($("#page").val() == 1){
						html='<div style="text-align: center;margin-top: 200px;background:#efeff4">暂无相关数据</div>';
					} 
				}
				$("#rm_ul").append(html);
				
			}
		}); 
	}
	
	$(window).scroll(function(){
		var scrollTop = $(window).scrollTop();       //滚动条高度
		var bodyheight = $(document).height();         //文档的高度
		var windowheight = window.innerHeight;	//$(window).height();              //当前窗体的高度
		if((bodyheight - windowheight - scrollTop) == 0){ 
			var index = layer.load(1, {shade: false,time: 1.5 * 1000});
			var page = $("#page").val();
			page++;
			$("#page").val(page);
			list(); 
		}				
	})
</script>